﻿@model Eisk.Models.EmployeeEditorModel
@{
    ViewBag.Title = Model.PageTitle;
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/eisk-required-if-validation.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.18.custom.min.js")"
        type="text/javascript"></script><script type="text/javascript">
    $(function () {
        $(".datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            showOn: "focus",
            showAnim: 'slideDown'
        });
    });
</script>
<script type="text/javascript">

    $("#anim").change(function () {
        $("#datepicker").datepicker("option", "showAnim", $(this).val());
    });

</script>
@using (Html.BeginForm(Model.EditorAction, "Employees", FormMethod.Post,
   new { enctype = "multipart/form-data" }))
{

    @Html.ValidationSummary(true)
    <h1 class="title-regular clearfix">
        @Model.PageTitle
    </h1>
    @Html.HiddenFor(model => model.Id)
    <div class="grid_6 alpha">
        @Html.EditorPanelFor(model => model.FirstName)
        @Html.EditorPanelFor(model => model.LastName)
        @Html.EditorDropdownPanelFor(model => model.ReportsTo, Model.SupervisorSelectList, "Choose a supervisor...")
        @Html.EditorPanelFor(model => model.Title)
        @Html.EditorPanelFor(model => model.TitleOfCourtesy)
        @Html.EditorDropdownPanelFor(model => model.Address.Country, Model.CountrySelectList, "Choose a country...")
        @Html.EditorCalenderPanelFor(model => model.HireDate)
        @Html.EditorPanelFor(model => model.Address.AddressLine)
        @Html.EditorPanelFor(model => model.Address.City)
        @Html.EditorPanelFor(model => model.Address.Region)
        @Html.EditorPanelFor(model => model.Address.PostalCode)
    </div>
    <div class="grid_6 omega">
        @Html.EditorPanelFor(model => model.Phone)
        @Html.EditorPanelFor(model => model.Extension)
        @Html.EditorCalenderPanelFor(model => model.BirthDate)
        @Html.Partial("_EditorImagePanel", Model)
        @Html.EditorPanelFor(model => model.Notes)
        <p>
            <input type="submit" value="Save" class="button green" />
        </p>
        <em>Required fields are marked with *</em>
    </div>
}
